<template>
  <div>
    <el-row type="flex" justify="center" align="middle" class="licc-order-pay-succ-top-row">
      <el-row type="flex" justify="center" align="middle"  style="width:1100px;">
        <el-col class="liccc-order-pay-succ-bread">
          <el-row style="width: 100%;  line-height: 100px; letter-spacing: 5px; font-weight: bolder; font-size: 18px;">
              支付成功
          </el-row>
          <el-row>
            <el-col :span="6" :offset="6">
              <router-link to="/home">返回首页</router-link>
            </el-col>
            <el-col :span="6">
              <router-link to="/allOrderInfo">查看订单</router-link>
            </el-col>
          </el-row>
        </el-col>
      </el-row>
    </el-row>
  </div>
</template>
<script>
  import orderApi from '@/api/order'
  export default {
    name: 'payOrder',
    data(){
      return{
        payhtml:'',
      }
    },
    created(){
      this.initPage();
    },
    methods: {
      initPage() {
        let params = {
          orderSn: this.$route.query.out_trade_no,
          payTime: this.$route.query.timestamp,
        }
        orderApi.orderPaySucc(params).then(res => {
          this.$notify.success({title:'支付成功', message: '订单编号为“'+params.orderSn+'”的订单支付成功！'});
        }).catch(() => {
          this.$notify.error({title:'提示', message: '系统繁忙，请稍后再试！'});
        })
      }
    },
  }
</script>
<style>
  .licc-order-pay-succ-top-row{
    width: 100%;
    margin-top: 20px;
  }
  .liccc-order-pay-succ-bread{
    width: 1100px;
    height: 200px;
    background-color: #fff;
  }
  .liccc-order-pay-succ-bread a{
    text-decoration: none;
    cursor: pointer;
    outline: 0;
    font-size: 14px;
    color: rgb(153, 153, 153);
  }
  .liccc-order-pay-succ-bread a:hover{
    color: #409EFF;
  }
</style>
